package cn.ffcs.security.web;

import java.util.List;
import java.util.Map;

import cn.ffcs.security.model.User;
import cn.ffcs.security.model.UserResource;

/**
 * 
 * 用户上下文信息<br/> <table>
 * <tr>
 * <td>负责人/principal: </td>
 * <td colspan="2">liuzhh</td>
 * <tr>
 * <td>修改记录/revision:</td>
 * <td colspan="2"></td>
 * </tr>
 * <tr>
 * <td>日期:</td>
 * <td>修改人:</td>
 * <td>修改说明:</td>
 * </tr>
 * <tr>
 * <td></td>
 * <td></td>
 * <td></td>
 * </tr>
 * </table>
 * @author liuzhh
 * @version $Id$
 */
public class UserContext
{
    /** 当前用户 **/
    private User currUser;
    /** 用户资源 **/
    private UserResource userResource;
    /** 用户资源列表 **/
    private List<UserResource> userResources;
    /** 菜单资源列表 **/
    private List<UserResource> menus;
    /** 模块菜单资源列表 **/
    private List<UserResource> modelMenus;
    /** 匹配资源列表 **/
    private Map<String,UserResource> dispatchResources;

    /**
     * 获取当前用户
     * @return the currUser
     */
    public User getCurrUser()
    {
        return currUser;
    }

    /**
     * 设置当前用户
     * @param currUser the currUser to set
     */
    public void setCurrUser(User currUser)
    {
        this.currUser = currUser;
    }

    /**
     * @return the userResource
     */
    public UserResource getUserResource()
    {
        return userResource;
    }

    /**
     * @param userResource the userResource to set
     */
    public void setUserResource(UserResource userResource)
    {
        this.userResource = userResource;
    }

    /**
     * @return the userResources
     */
    public List<UserResource> getUserResources()
    {
        return userResources;
    }

    /**
     * @param userResources the userResources to set
     */
    public void setUserResources(List<UserResource> userResources)
    {
        this.userResources = userResources;
    }

    /**
     * @return the menus
     */
    public List<UserResource> getMenus()
    {
        return menus;
    }

    /**
     * @param menus the menus to set
     */
    public void setMenus(List<UserResource> menus)
    {
        this.menus = menus;
    }

    /**
     * @return the modelMenus
     */
    public List<UserResource> getModelMenus()
    {
        return modelMenus;
    }

    /**
     * @param modelMenus the modelMenus to set
     */
    public void setModelMenus(List<UserResource> modelMenus)
    {
        this.modelMenus = modelMenus;
    }

    /**
     * @return the dispatchResources
     */
    public Map<String,UserResource> getDispatchResources()
    {
        return dispatchResources;
    }

    /**
     * @param dispatchResources the dispatchResources to set
     */
    public void setDispatchResources(Map<String,UserResource> dispatchResources)
    {
        this.dispatchResources = dispatchResources;
    }
    
}
